package main.java.com.demo;

import com.jfinal.config.*;
import com.jfinal.ext.handler.ContextPathHandler;
import com.jfinal.render.ViewType;
import main.java.com.demo.IndexController;

/**
 * Created by hushiwei on 2016/9/3.
 */
public class DemoConfig extends JFinalConfig {

    public void configConstant(Constants me) {
        me.setDevMode(true);
        me.setEncoding("utf-8");
        me.setViewType(ViewType.JSP);
    }

    public void configHandler(Handlers me) {
        me.add(new ContextPathHandler("basePath"));
    }

    public void configRoute(Routes me) {
        me.add("/", IndexController.class);
        me.add("/hello",HelloController.class);
    }

    public void configInterceptor(Interceptors me) {}
    public void configPlugin(Plugins me) {}
}
